#ifndef OBJ_WAGON
#define OBJ_WAGON

#include "render_pipeline.h"
#include "obj_orail.h"
#include "obj.h"

#define WAG_LOCOMOTIVE 0
#define WAG_FLAT 1

#define WAG_NUM 2

#define WAG_WIDTH 3
#define WAG_LENGHT 6

class obj_wagon : public obj {
	public:
		obj_wagon();
		virtual void load(){}

		int type;
		static int cloaded;	//class loaded
		static GLuint wag_textures[WAG_NUM];

		rail* rffrom,*rfto;	//rail front
		rail* rrfrom,*rrto;	//rail rear
		float rprogress,fprogress;	//from 0 to 1
		float xf,yf;
		static float speed;
		void draw_wagon();
		void update_pos();
};

#endif
